package com.znjc.device.domain;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.znjc.common.annotation.Excel;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 【请填写功能名称】对象 device_alarm
 *
 * @author zengpc
 * @date 2023-12-04
 */
@Data
public class DeviceAlarm extends BaseZnjcEntity {
    private static final long serialVersionUID = 1L;


    /**
     * 设备id
     */
    @Excel(name = "设备id")
    private Long deviceId;
    /**
     * 设备名称
     */
    @Excel(name = "设备名称")
    @TableField(exist = false)
    private String deviceName;
    /**
     * 设备编码
     */
    @Excel(name = "设备编码")
    @TableField(exist = false)
    private String deviceCode;
    /**
     * 开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    /**
     * 告警内容
     */
    @Excel(name = "告警内容")
    private String alarmContent;

    /**
     * 告警类别 0数值告警 1通信告警
     */
    @Excel(name = "告警类别 0数值告警 1通信告警")
    private String alarmType;

    /**
     * 测点id
     */
    @Excel(name = "测点id")
    private Long pointId;
    /**
     * 测点编码
     */
    @Excel(name = "测点编码")
    @TableField(exist = false)
    private String pointCode;
    /**
     * 测点名称
     */
    @Excel(name = "测点名称")
    @TableField(exist = false)
    private String pointName;

    /**
     * 告警名称
     */
    @Excel(name = "告警名称")
    private String alarmName;
    /**
     * 告警值
     */
    @Excel(name = "告警值")
    private String alarmValue;

    /**
     * 规则方式
     */
    @Excel(name = "规则方式")
    private String ruleWay;
    /**
     * 阈值
     */
    @Excel(name = "阈值")
    private String ruleValue;
    /**
     * 告警原因
     */
    @Excel(name = "告警原因")
    private String reason;

    /**
     * 判断故障
     */
    @Excel(name = "判断故障")
    private String estimateFault;
    /**
     * 处理方案
     */
    @Excel(name = "处理方案")
    private String dealScheme;

    /**
     * 处理时间
     */
    @TableField(fill = FieldFill.UPDATE)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "处理时间",dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date dealTime;

    /**
     * 处理人
     */
    private Long dealBy;
    /**
     * 处理人
     */
    @TableField(exist = false)
    @Excel(name = "处理人")
    private String dealBys;
    /**
     * 查询时间开始时间
     */
    @TableField(exist = false)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date queryStartTime;
    /**
     * 查询时间开始时间
     */
    @TableField(exist = false)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date queryEndTime;


}
